<html>
<head><meta charset="utf-8"><title>update · z-archived-t-compiler/wg-rls-2.0/chalk · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/index.html">z-archived-t-compiler/wg-rls-2.0/chalk</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html">update</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="162947763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162947763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162947763">(Apr 09 2019 at 20:38)</a>:</h4>
<p>BTW, things slowed down a bit here for a few reasons, but I wanted to give a few updates.</p>
<p>1. Part of the reason for the slowdown is that (on the wg-traits side) we were looking against rustc-chalk integration. I still think though we should be pursuing the RLS 2.0 integration. A lot of the hard problems though will be the same in both cases.<br>
2. That said, I spent a fair amount of time refactoring chalk to enable "query-ification" and I plan to open some PRs for that soon. It's not all the way done but at least the path is becoming clear.</p>



<a name="162948843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162948843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162948843">(Apr 09 2019 at 20:50)</a>:</h4>
<p>I've actually been working on preparing for Chalk integration on the rust-analyzer side (see also <a href="https://github.com/rust-analyzer/rust-analyzer/issues/1120" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/1120">rust-analyzer#1120</a>), so I hope we'll be ready to do it once the Chalk queryfication is done :)</p>



<a name="162988665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162988665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162988665">(Apr 10 2019 at 09:34)</a>:</h4>
<p><span class="user-mention" data-user-id="129457">@Florian Diebold</span> great! I was planning on creating a doodle today to find a time to discuss the queries and setup in more depth. Maybe you can talk about what you've been doing as well so we can line them up.</p>



<a name="162988668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162988668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162988668">(Apr 10 2019 at 09:34)</a>:</h4>
<p>And/or feel free to leave some notes here now :)</p>



<a name="162988680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162988680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162988680">(Apr 10 2019 at 09:34)</a>:</h4>
<p>One thing that became clear btw, when <span class="user-mention" data-user-id="117350">@Sunjay Varma</span> and I were looking, is that the notion of "current crate" does not want to completely go away</p>



<a name="162988707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162988707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162988707">(Apr 10 2019 at 09:35)</a>:</h4>
<p>I think the way this will map to <strong>rust-analyzer</strong> is that there needs to be a distinct "trait solver" for each crate -- this is because each crate operates with a different set of impls</p>



<a name="162988750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162988750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162988750">(Apr 10 2019 at 09:35)</a>:</h4>
<p>basically, I think the rust-analyzer has no notion of current crate, and that's fine, but chalk does, and so rust analyzer will always talk to chalk with a current crate in mind</p>



<a name="162989094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162989094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162989094">(Apr 10 2019 at 09:41)</a>:</h4>
<p>hm yeah, that's true</p>



<a name="162990153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162990153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162990153">(Apr 10 2019 at 10:00)</a>:</h4>
<p>That makes total sense, yeah. Question: would solvers for different crates share any data?</p>
<p>For example, each crate depends on std, so each solver has to know about all of std's impls. If we naively duplicate the impls per solver, we'll have O(N^2) situation</p>



<a name="162990180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162990180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162990180">(Apr 10 2019 at 10:00)</a>:</h4>
<p>I've been wondering about that. I'm not sure the answer.</p>



<a name="162990281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162990281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162990281">(Apr 10 2019 at 10:02)</a>:</h4>
<p>I think initially they would share minimal state, but we might be able to increase it.</p>



<a name="162990294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162990294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162990294">(Apr 10 2019 at 10:02)</a>:</h4>
<p>That said, my hope would be that we aren't (e.g.) type-checking other crates that often :)</p>



<a name="162990305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/162990305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#162990305">(Apr 10 2019 at 10:03)</a>:</h4>
<p>So it may not be a big issue in practice</p>



<a name="163001268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update/near/163001268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/update.html#163001268">(Apr 10 2019 at 12:55)</a>:</h4>
<p>We'd at least be type-checking all the crates in the workspace, which may already be a few... but we'll see :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>